<template id="Select">
    <div>
        <div class="select_x">
            <div class="select_bi_buy">
                <h1>
                    <div class="select_1"><img class='img' src="../image/xian.jpg" alt=""></div>
                    <span class="select_3">小马精选</span>
                    <div class="select_2"><img class="img_1" src="../image/xian_1.jpg" alt=""></div>
                </h1>
                <p>小马生鲜 给你最好的美味</p>
            </div>
            <div class="x_ma">
                <div class="li_st" v-for="sel in tag1_list">
                    <div class="x_m"><img class="img_l1"  :src="sel.thumb" alt="" @click="getSel(sel.id)"></div>
                    <div class="x_right">
                        <h2 @click="getSel(sel.id)">{{sel.name}}</h2>
                        <p @click="getSel(sel.id)">{{sel.goods_brief}}</p>
                        <div class="Select_price"><span @click="getSel(sel.id)"><strong>{{sel.shop_price}}</strong>/200g*2</span><img src="../image/add_q.png" alt="" @click="addCart(sel.id,sel.thumb)"></div>
                    </div>
                </div>
            </div>

        </div>

    </div>
</template>
<script>
    export default {
        name:'Select',
        data(){
            return{
                /*   id:this.$route.query.this.ma.id,*/
                tag1_ad:[],
                tag1_list:[],
            }
        },
        mounted:function(){
            let mode1 = 'six';
            this.GLOBAL.getList(this,mode1,1);
        },
        methods:{
            getSel:function(id){
                this.$router.push('/shopDetails?goods_id='+id);
            },
            test:function (a) {
                /*this.GLOBAL.addShop(a);*/
            },
			addCart:function (goods_id,image, number = 1) {
				this.GLOBAL.addCart(this,goods_id,number);
                this.GLOBAL.get_te(image)
			}
        }
    }
</script>
<style>

    .li_st{
        height:2.45rem;
        width:100%;
         display:flex;
        flex-wrap: wrap;
        justify-content:flex-start;
    }
    .Select_price{
        height:0.68rem;
        position:relative;
        top:0;
    }
    .Select_price span{
        display:block;
        color:#ff4800;
        font-size:0.18rem;
        width:2rem;
        height:0.68rem;
        line-height:0.68rem;
    }
    .Select_price strong{
        font-size:0.24rem;
    }
    .Select_price img{
        display:block;
        position:absolute;
        top: 0.1rem;
        right:0.8rem;
        height:0.35rem;
        width:0.35rem;
    }
    .x_m{
        flex:1;
        height:2.45rem;
    }
    .x_m img{
        display:block;
        width:2rem;
        height:2rem;
        margin:0 auto;
    }
    .x_right{
        height: 2.17rem;
        flex: 1;
        padding-top: 0.3rem
    }
    .x_right h2{
        height:0.42rem;
        color:#4a4a4a;
        font-size:0.28rem;
        line-height:0.25rem;
        font-weight:normal;
    }
    .x_right p{
        height:0.35rem;
        color:#bababa;
        font-size:0.19rem;
        line-height:0.19rem;
    }
.select_x{
    min-height:8.87rem;
    width:100%;
    border-bottom:10px solid #f5f4f2;
}
.select_bi_buy{
    margin:20px 0;
}
.select_bi_buy h1{
    font-size:0.28rem;
    color: #4a4a4a;
    height:0.42rem;
   /* line-height:0.42rem;*/
   /* text-align:center;*/
    width:100%;
    display:flex;
   /* position:relative;*/

}
.select_1{
    flex:1;
    height:0.3rem;
}
    .select_2{
        flex:1;
        height:0.3rem;
    }
    .select_3{
        display:block;
        font-size: 0.32rem;
        color: #4a4a4a;
        line-height: 0.3rem;
        width:auto;
        text-align:center;
    }
.select_bi_buy img{
    display:inline-block;
    width:1.8rem;
    height:0.3rem;
   /* position:absolute;*/
}
    .select_1 img{
   /* top:0;
    left:0.8rem;*/
        display:block;
        float:right;
}
.select_2 img{
   /* top:0;
    right: 0.7rem;*/
    display:block;
    float:left;
}
.select_bi_buy p{
    height:0.3rem;
    line-height:0.3rem;
    text-align:center;
    color:#afafaf;
    font-size:0.22rem;
}
    .x_ma{
        min-height:7.7rem;
        width:100%;
    }
</style>